/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package flight.service;
import flight.model.Flight;
import flight.model.FlightList;
import middleware.Callback;
import middleware.Remote;
/**
 *
 * @author tam
 */
public interface FlightService extends Remote{
    //get identifiers by specifying source and destination
    public FlightList getIdsBySourceAndDest(String s, String d);
    //get depart time, airfare and seat availability
    public Flight getFlightById(int id);
    //reserve flight
    public String reserveSeats(int id, int noOfSeats);
    //monitor seat availability - need flight id, interval, register callback,
    public String registerCallbackFlightClient(int flightId, int interval, Callback obj);
    //get flights on a certain date
    public FlightList getFlightsOnDate(String date);
    //get chpeast flight
    public Flight getCheapest();
    //update price
    public String discountPrice(int id, float percentage);
}
